-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Azure Linux 3 for Azure #1465
Conversation
@@ -16,7 +16,7 @@ | |||
when: ansible_os_family == "Debian" | |||
|
|||
- ansible.builtin.import_tasks: redhat.yml | |||
when: ansible_os_family in ["Common Base Linux Mariner", "RedHat"] | |||
when: ansible_os_family in ["Common Base Linux Mariner", "Microsoft Azure Linux", "RedHat"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, v3 has a completely different ansible_os_family
string, as well as ansible_distribution
. So we need to check for both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I'm working on a PR for ansible/ansible that adds Azure Linux detection in general, and sets the distro fact to Azure
. This would simplify these checks. (Thanks for the Flatcar team for having blazed this trail already!)
images/capi/azure_targets.sh
Outdated
SIG_CI_TARGETS="ubuntu-2204 ubuntu-2404 mariner-2 windows-2019-containerd windows-2022-containerd flatcar" | ||
SIG_GEN2_TARGETS="ubuntu-2004 ubuntu-2204 ubuntu-2404 centos-7 mariner-2 flatcar" | ||
SIG_GEN2_CI_TARGETS="ubuntu-2204 ubuntu-2404 mariner-2 flatcar" | ||
VHD_TARGETS="ubuntu-2004 ubuntu-2204 ubuntu-2404 centos-7 azurelinux-2 azurelinux-3 rhel-8 windows-2019-containerd windows-2022-containerd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added azurelinux-3
to the build targets but not the CI ones. This way it's possible to build Azure Linux 3, but image-builder CI won't fail if there are hiccups in the prerelease versions.
@@ -1,6 +1,6 @@ | |||
{ | |||
"build_name": "mariner-2", | |||
"distribution": "mariner", | |||
"build_name": "azurelinux-2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we consider this a breaking change as I think this changes the name of final image, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right, if someone was depending on that naming pattern. I was just trying to keep the Makefile
targets intact for backward-compatibility. The build_name
also needs to match the build target name AFAICT, so reverting this to mariner-2
might mean reworking the Makefile as well.
I was hoping to have this be consistently azurelinux
, to make it easier to navigate (and also to simplify some code I wrote here: kubernetes-sigs/cluster-api-provider-azure#4832). image-builder hasn't had a 1.0 release yet, so I think technically we can break things...but let's not if it's avoidable. Let me see how I can improve this, good catch @AverageMarcus!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reworked this PR to leave the existing mariner-2
targets and publishing info intact, just adding forward-compatible azurelinux-2
targets and new azurelinux-3
support. This seems unlikely to break anyone's usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@mboersma is this PR good to go or are you wanting to wait on the changes to Ansible first?
I think it's ready. The change to Ansible isn't a PR yet (I'm still working out how to run the unit tests to verify my changes), and it would need to be cherry-picked into their releases. So: not any time soon. I'll refactor this in the future to be simpler. |
👍 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AverageMarcus The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/kind feature
/area provider/azure
Change description
Adds support for the upcoming Azure Linux 3 release and changes references from "Mariner" to "Azure Linux" for consistency.
Azure Linux 3 doesn't release until July AFAICT, but the source image feed looks stable and everything works, so I thought I'd jump the gun and add this now. But if it's better to wait for the official release (or to prefix the make targets with "Preview" or somesuch), please comment here.
Related issues
N/A
Additional context
I've tested this locally, but I left Azure Linux 3 out of CI tests, since it's not released yet. Once it's officially released, we can consider it stable enough to add to image-builder tests.